package com.yh.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yh.entity.Pic;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PicMapper extends BaseMapper<Pic> {

    @Select("select * from t_carousel where title like concat('%',#{p.title},'%') order by sort_order desc")
    List<Pic> getAllPic(Pic p, Page<Pic> page);
    @Select("select * from t_carousel where title like concat('%',#{p.title},'%') and status=1 order by sort_order desc")
    List<Pic> getUpPic(Pic p,Page<Pic> page);
    @Select("select * from t_carousel where status=1 order by sort_order desc")
    List<Pic> getPic(Page<Pic> page);
}
